package com.ecoolex.union.pay.retailer.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;


public enum PaymentOrderRecordOperType implements EnumInterface<PaymentOrderRecordOperType, Integer> {
	ORDER_APPLY(1, "订单申请"),
	ORDER_CHECK(2, "订单检查"),
	ORDER_NOTIFY(3, "订单通知"),
	REFUND_APPLY(4, "退款申请"),
	REFUND_CHECK(5, "退款检查"),
	REFUND_NOTIFY(6, "退款通知");

	private int real;

	private String describe;

	private PaymentOrderRecordOperType(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	@Override
	public PaymentOrderRecordOperType realOf(Integer real) {
		if (Check.notNull(real)) {
			for (PaymentOrderRecordOperType v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
}
